<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>caniplay</title>
</head>
<body>
    <script>
        var video = document.createElement('video')
        var a = video.canPlayType('application/vnd.apple.mpegURL')
        var b = video.canPlayType('video/mp4')
        document.write(a ? '能播放hls' : '不能播放hls')
        document.write(b ? '能播放mp4' : '不能播放mp4')
    </script>
</body>
</html>